package com.foreknow.demo5;


import java.util.Scanner;

public class Manager {
    //登录（用户名，和密码）
    public static boolean  login(String i,String j){

        return true;

    }
    //注册（填写用户名和密码）
    public static String zuce(String i,String j){
        return zuce("人呢两","1212");
    }
    //根据id来查询用户名信息

    public static String  sum(int id){
        //select user from emp where id="";
        Scanner input = new Scanner(System.in);
        String uese = input.next();
        return uese;
    }

    //根据id删除用户
    //delete from emp where id= "";
    //修改用户信息(修改用户名和密码)
    //update emp set i="",j="" where id="";
    public static boolean update(String uese ){
        return true;
    }
    //查询所有用户信息
    //select * from emp
    public static  String[] getQueryByNames(){
        String[] array = new String[10];
         array[0]="tom";
        return array;
    }
    public static void main(String[] args) {
       String[] arr = Manager.getQueryByNames();
       for (int i=0;i<arr.length;i++){
           System.out.println(arr[i]);

       }
        boolean isRight =Manager.login("111","123");
        if (isRight){
            System.out.println("登录 ");
        }else {
            System.out.println("失败");
        }
//      String is =  Manager.zuce("1","1");
//        System.out.println("注册成功"+is);
       String uese = Manager.sum(1);
        System.out.println(uese);
       boolean ueses = Manager.update(uese);
        if (uese.equals(true)){
            System.out.println("成功");
        }else {
            System.out.println("失败");
        }

    }
}
